perm filename C.DIF[CLS,LSP] blob sn#856503 filedate 1988-04-27 generic text, type T, neo UTF8
  1) CONCEP.TEX[CLS,LSP] and 2) CONCEP.36[CLS,LSP]	4-27-88 13:09	pages 1,1

**** File 1) CONCEP.TEX[CLS,LSP]/1P/704L
1)	an instance whose class has been redefined), there are no
1)	initialization arguments.  Users can take advantage of the {\bf \&rest}
1)	argument by defining {\bf :around} methods that compute initialization
1)	arguments and then call {\bf call-next-method}.
1)	There is a system-supplied primary method for {\bf
1)	update-instance-for-redefined-class} whose parameter specializer for its
1)	first argument is the class {\bf standard-object}.  This method
1)	checks the validity of initialization arguments, and signals an error if
1)	an initialization argument is supplied that is not declared as valid.
1)	Initialization arguments are declared as valid by using the {\bf
**** File 2) CONCEP.36[CLS,LSP]/1P/704L
2)	an instance whose class has been redefined), no initialization arguments
2)	are provided.   Users can take advantage of the {\bf \&rest} argument by
2)	defining {\bf :around} methods that compute initialization arguments and
2)	then call {\bf call-next-method}.
2)	There is a system-supplied primary method for {\bf
2)	update-instance-for-redefined-class} whose parameter specializer for its
2)	first argument is the class {\bf standard-object}.   This method checks
2)	the validity of initialization arguments, and signals an error if an
2)	initialization argument is supplied that is not declared as valid.
2)	Initialization arguments are declared as valid by using the {\bf
***************


**** File 1) CONCEP.TEX[CLS,LSP]/1P/720L
1)	This method then initializes slots with values according to the
1)	initialization arguments, and initializes the newly-added slots with
1)	values according to their initforms.  It does this by calling the
1)	generic function {\bf initialize-instance} with three arguments:  the
1)	instance, a list of names of the newly-added slots, and initialization
1)	arguments.  Here, a ``newly-added slot'' is a local slot defined in the
1)	new version of the class where there was no slot with the same name 
1)	defined in the old version of the class.
1)	\endsubSection%{Initializing Newly-added Local Slots}
**** File 2) CONCEP.36[CLS,LSP]/1P/720L
2)	The default method for {\bf update-instance-for-redefined-class} calls
2)	the generic function {\bf initialize-instance} with three arguments:
2)	the instance being updated after it has undergone the first step, a list
2)	of the names of slots that were added, and the initialization arguments.
2)	There is a system-supplied primary method for {\bf initialize-instance}
2)	whose parameter specializer for its first argument is the class {\bf
2)	standard-object}.  When called with the arguments as described above,
2)	this method initializes the newly-added local slots according to their
2)	initforms.
2)	Any local slot of the new version of the class that does not have the
2)	same name as a slot of the old version of the class is initialized as
2)	follows:
  1) CONCEP.TEX[CLS,LSP] and 2) CONCEP.36[CLS,LSP]	4-27-88 13:09	pages 1,1

2)	\beginlist
2)	\item{\bull} If the new version of the class specifies or inherits
2)	an {\bf :initform} form for the slot, the value of the slot is set to
2)	the result of evaluating the captured {\bf :initform} form.
2)	\item{\bull} If no {\bf :initform} form is specified or inherited,
2)	the slot remains unbound.
2)	\endlist
2)	\endsubSection%{Initializing Newly-added Local Slots}
***************


**** File 1) CONCEP.TEX[CLS,LSP]/1P/832L
1)	arguments.    When it is called by {\bf change-class}, there are 
1)	no initialization arguments.  Users can take advantage of the {\bf \&rest} argument by
1)	defining {\bf :around} methods that compute initialization arguments and
**** File 2) CONCEP.36[CLS,LSP]/1P/849L
2)	arguments.    When it is called by {\bf change-class}, no initialization arguments
2)	are provided.   Users can take advantage of the {\bf \&rest} argument by
2)	defining {\bf :around} methods that compute initialization arguments and
***************


**** File 1) CONCEP.TEX[CLS,LSP]/1P/849L
1)	initializes slots with values according to the initialization arguments,
1)	and initializes the newly-added slots with values according to their
1)	initforms.  It does this by calling the generic function {\bf
1)	initialize-instance} with three arguments:  the instance, a list of
1)	names of the newly-added slots, and initialization arguments.  Here, a
1)	``newly-added slot'' is a local slot defined by the current class where
1)	there is no slot by the same name defined by the previous class.
1)	\endsubSection%{Initializing Newly-added Local Slots}
**** File 2) CONCEP.36[CLS,LSP]/1P/866L
2)	calls the generic function {\bf initialize-instance} with three
2)	arguments:  the instance as updated so far by {\bf change-class}; a list
2)	of the names of slots that were added; and the initialization arguments
2)	that were supplied in the call to {\bf
2)	update-instance-for-different-class}, if any.
2)	There is a system-supplied primary method for {\bf initialize-instance}
2)	whose parameter specializer for its first argument is the class {\bf
2)	standard-object}.  When called with the arguments as described above,
2)	this method initializes the newly-added local slots according to their
2)	initforms. 
2)	A local slot of the class $C\sub {\hbox{{\prmseven to}}}$ with no slot
2)	by the same name in the class $C\sub {\hbox{{\prmseven from}}}$ is
2)	initialized as follows:
2)	\beginlist
2)	\item{\bull} If the class $C\sub {\hbox{{\prmseven to}}}$ specifies
2)	or inherits an {\bf :initform} form for the slot, the value of the
  1) CONCEP.TEX[CLS,LSP] and 2) CONCEP.36[CLS,LSP]	4-27-88 13:09	pages 1,1

2)	slot is set to the result of evaluating the captured {\bf
2)	:initform}.
2)	\item{\bull} If no {\bf :initform} form is specified or inherited,
2)	the slot remains unbound.
2)	\endlist
2)	\endsubSection%{Initializing Newly-added Local Slots}
***************


**** File 1) CONCEP.TEX[CLS,LSP]/1P/878L
1)	\endSection%{Changing the Classes of an Instance}
1)	\beginSection{Reinitializing an Instance}
**** File 2) CONCEP.36[CLS,LSP]/1P/915L
2)	\beginSection{Reinitializing an Instance}
***************


**** File 1) CONCEP.TEX[CLS,LSP]/1P/894L
1)	argument, which consists of initialization arguments to be used by methods
1)	for {\bf reinitialize-instance} or {\bf initialize-instance}.
1)	There is a system-supplied primary method for {\bf
**** File 2) CONCEP.36[CLS,LSP]/1P/928L
2)	argument, which are initialization arguments to be used by methods for
2)	{\bf reinitialize-instance} or {\bf initialize-instance}.
2)	There is a system-supplied primary method for {\bf
***************


**** File 1) CONCEP.TEX[CLS,LSP]/1P/903L
1)	{\bf defclass}, or by defining methods for {\bf reinitialize-instance}
1)	or {\bf initialize-instance}.  See the section ``Declaring the Validity
1)	of Initialization Arguments'' for more details.
1)	The default method for {\bf reinitialize-instance} calls the generic
**** File 2) CONCEP.36[CLS,LSP]/1P/937L
2)	{\bf defclass}, or by defining methods for {\bf
2)	update-instance-for-redefined-class} or {\bf initialize-instance}.  See
2)	the section ``Declaring the Validity of Initialization Arguments'' for
2)	more details.
2)	The default method for {\bf reinitialize-instance} calls the generic
***************


**** File 1) CONCEP.TEX[CLS,LSP]/1P/912L
1)	\beginsubSection{Customizing Reinitialization}
**** File 2) CONCEP.36[CLS,LSP]/1P/947L
2)	There is a system-supplied primary method for {\bf initialize-instance}
2)	whose parameter specializer for its first argument is the class {\bf
2)	standard-object}.  When called with the arguments as described above,
  1) CONCEP.TEX[CLS,LSP] and 2) CONCEP.36[CLS,LSP]	4-27-88 13:09	pages 1,1

2)	this method does not initialize any slots according to their initforms.
2)	If any of the initialization arguments are defined to fill slots (by
2)	means of the {\bf :initarg} option to {\bf defclass}), this method
2)	writes the values into the corresponding slots.  
2)	\beginsubSection{Customizing Reinitialization}
***************


**** File 1) CONCEP.TEX[CLS,LSP]/1P/924L
1)	update-instance-for-different-class} {\bf 
1)	update-instance-for-redefined-class}, and {\bf initialize-new-instance},
**** File 2) CONCEP.36[CLS,LSP]/1P/967L
2)	update-instance-for-different-class} {\bf
2)	update-instance-for-redefined-class}, and {\bf initialize-new-instance},
***************


**** File 1) CONCEP.TEX[CLS,LSP]/1P/932L
1)	\beginSection{Integrating Types and Classes} 
**** File 2) CONCEP.36[CLS,LSP]/1P/976L
2)	\endSection%{Changing the Classes of an Instance}
2)	\beginSection{Integrating Types and Classes} 
***************


**** File 1) CONCEP.TEX[CLS,LSP]/1P/2258L
1)	Initialization arguments that supply arguments to methods are declared
1)	as valid by defining methods for {\bf initialize-new-instance}, {\bf
1)	initialize-instance}, or {\bf allocate-instance}.  The keyword name of
1)	each keyword parameter specifier in the method's lambda-list becomes an
1)	initialization argument for all classes for which the method is
1)	applicable.  Thus method inheritance controls the set of valid
1)	initialization arguments that supply arguments to methods.
1)	Note that the mechanism of having methods declare valid initialization
1)	arguments is used in contexts other than {\bf make-instance}.   For {\bf
1)	make-instance}, the set of valid initialization arguments includes those
1)	defined by applicable methods for {\bf initialize-new-instance}, {\bf
1)	initialize-instance}, or {\bf allocate-instance}.  For another example,
1)	the generic function {\bf update-instance-for-redefinition} accepts
1)	initialization arguments defined by applicable methods for {\bf
1)	update-instance-for-redefinition} and {\bf initialize-instance}. 
1)	The set of valid initialization arguments for a class is the set of
**** File 2) CONCEP.36[CLS,LSP]/1P/2304L
2)	Initialization arguments that supply arguments to methods are declared as
2)	valid by defining methods for {\bf initialize-new-instance} or {\bf
2)	allocate-instance}.  The keyword name of each keyword parameter specifier
2)	in the method's lambda-list becomes an initialization argument for all
2)	classes for which the method is applicable.  Thus method inheritance
  1) CONCEP.TEX[CLS,LSP] and 2) CONCEP.36[CLS,LSP]	4-27-88 13:09	pages 1,1

2)	controls the set of valid initialization arguments that supply arguments
2)	to methods.
2)	The set of valid initialization arguments for a class is the set of
***************


**** File 1) CONCEP.TEX[CLS,LSP]/1P/2468L
1)	be initialized according to their initforms), and the defaulted 
1)	initialization argument list.
1)	 
1)	There is a system-supplied primary method for {\bf initialize-instance}
1)	whose parameter specializer is the class {\bf standard-object}.   This
1)	method behaves as follows, regardless of whether the slots are local or
1)	shared:
1)	\beginlist
1)	\item{\bull} For any slot for which a corresponding initialization
1)	argument was provided in the call to {\bf initialize-instance}, the
1)	value of the initialization argument is stored into the slot.  This
1)	happens even if a value has already been stored in the slot before the
1)	method is run.
1)	\item{\bull} Any slots indicated by the second argument that are still
1)	unbound at this point are initialized according to their initforms.  For
1)	any such slot that has an {\bf :initform} form, that form is evaluated
1)	in the lexical environment of its defining {\bf defclass} form and the
1)	result is stored into the slot.   This does not happen if a value has
1)	already been stored in the slot by an initialization argument, or
1)	before the method is run.  For example, if a {\bf :before} method stores
1)	a value in the slot, the {\bf :initform} form will not be used to supply
1)	a value for the slot.
1)	\item{\bull} The rules mentioned in the section ``Rules for Duplicate
**** File 2) CONCEP.36[CLS,LSP]/1P/2505L
2)	be initialized according to their initforms), and the defaulted
2)	initialization argument list.
2)	There is a system-supplied primary method for {\bf initialize-instance}
2)	whose parameter specializer is the class {\bf standard-object}.   When
2)	called with the arguments as described above, this method initializes
2)	all slots with values according to the defaulted initialization argument
2)	list.  Thus, this method behaves as follows on each slot, whether shared
2)	or local:
2)	\beginlist
2)	\item{\bull} If an initialization argument in the defaulted
2)	initialization argument list specifies a value for that slot, that
2)	value is stored into the slot,  even if a value has
2)	already been stored in the slot before the method is run. For example, a
2)	{\bf :before}, an {\bf :around} method, or a more specific primary
2)	method might store a value in the slot, and the system-supplied
2)	primary method will overwrite that value.
2)	\item{\bull} Otherwise if the slot is still unbound and has an {\bf
  1) CONCEP.TEX[CLS,LSP] and 2) CONCEP.36[CLS,LSP]	4-27-88 13:09	pages 1,1

2)	:initform} form, that form is evaluated in the lexical environment of
2)	its defining {\bf defclass} form and the result is stored into the
2)	slot. For example, if a {\bf :before} method stores a value in the
2)	slot, the {\bf :initform} form will not be used to supply a value for
2)	the slot.
2)	\item{\bull} The rules mentioned in the section ``Rules for Duplicate
***************


**** File 1) CONCEP.TEX[CLS,LSP]/1P/2499L
1)	Note that {\bf initialize-new-instance} provides the defaulted
1)	initialization argument list in its call to {\bf initialize-instance},
1)	so the first step takes into account both the initialization arguments
1)	provided in the call to {\bf make-instance} and the default
1)	initialization arguments.   
1)	Methods for {\bf initialize-new-instance} can be defined to specify
**** File 2) CONCEP.36[CLS,LSP]/1P/2537L
2)	Methods for {\bf initialize-new-instance} can be defined to specify
***************


**** File 1) CONCEP.TEX[CLS,LSP]/1P/2514L
1)	initialize-new-instance} methods.  The function {\bf slot-boundp}
1)	returns a boolean value that indicates whether the slot has a value;
1)	this provides a mechanism for writing {\bf :after} methods for {\bf
1)	initialize-new-instance} that initialize slots only if they have not
1)	already been initialized.  The function {\bf slot-makunbound} causes the
1)	slot to have no value.
1)	Sometimes the actions that are taken when an instance is reinitialized
1)	are also appropriate in other contexts.   The generic function {\bf
1)	initialize-instance} is called by methods for {\bf
1)	update-instance-for-different-class} {\bf
1)	update-instance-for-redefined-class}, and {\bf reinitialize-instance},
1)	as well as by the method for {\bf initialize-new-instance}.  Thus,
1)	methods can be written for {\bf initialize-instance} to specify actions
1)	that should be taken in all of these contexts. 
1)	\endsubSection%{Methods for Initialize-New-Instance}
**** File 2) CONCEP.36[CLS,LSP]/1P/2545L
2)	initialize-new-instance} methods.  The function {\bf slot-boundp} returns a
2)	boolean value that indicates whether the slot has a value; this provides
2)	a mechanism for
2)	writing {\bf :after} methods for {\bf initialize-new-instance} that initialize
2)	slots only if they have not already been initialized.  The function {\bf
2)	slot-makunbound} causes the slot to have no value.
2)	\endsubSection%{Methods for Initialize-New-Instance}
***************